#include "PlayerMoveHandler.h"

MoveHandler* PlayerMoveHandler::instance =0;

PlayerMoveHandler::PlayerMoveHandler() : MoveHandler()
{

}

MoveHandler* PlayerMoveHandler::getInstance()
{
    if(instance==0)
        instance = new PlayerMoveHandler();
   return instance;
}

void PlayerMoveHandler::move(Unit* unit)
{
	Physic::applyGravity(unit, Physic::baseGravity);
    unit->getPosRect()->x=unit->getPosRect()->x+unit->getVelocityX();
    unit->getPosRect()->y=unit->getPosRect()->y+unit->getVelocityY();


}
